package com.zhou.hot.script;

import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;


public final class HotClassloaderHelp {
	public static Class<?> loadClass(File file,String clazzName) throws MalformedURLException, ClassNotFoundException {
			URL[] urls = new URL[] {
					file.toURI().toURL()
			};
			HotURLClassLoader classLoader = new HotURLClassLoader(urls, Thread.currentThread().getContextClassLoader());

			Class<?> clazz = classLoader.loadClass(clazzName);
			return clazz;
	}
}
